#ifndef calendarview_h
#define calendarview_h

#include "juce_amalgamated.h"
#include "../FoodObjects/Eatable.h"
#include "CalendarButton.h"
#include "CalendarCreateListButton.h"
#include <vector>

using std::vector;

class CalendarPanel;
class GroceryListView;

class MealDay
{
private:
	vector<Eatable> meals;

public:
	MealDay()
	{

	}

	vector<Eatable>& getMeals()
	{
		return meals;
	}
};

class CalendarView: public Component
{
private:
	int mouseX;
	int mouseY;
	int size;

	MealDay mealDays[7];
	CalendarButton* addButton[7];
	CalendarButton* minusButton[7];
	CalendarCreateListButton* createButton;
	GlowEffect glow;

	GroceryListView* glView;
	CalendarPanel* panel;

	int getCalories(int i);
public:
	CalendarView(CalendarPanel* panel);
	~CalendarView();
	void paint(Graphics& g);
	void mouseMove(const MouseEvent& e);
	void addToDay(int id, Eatable& meal);
	void subtractFromDay(int id);
	void resized();
	void createGroceryList();
	void setGroceryListView(GroceryListView* view);
};

#endif
